include_directories( ${CMAKE_SOURCE_DIR}/clang-stdc )
include_directories( ${CMAKE_SOURCE_DIR}/clang-stdc/impl )
add_definitions(-D__IMPL_CLANG_PORT_API_)
set( SRC
	complex.c
	ctype.c
	fenv.c
	inttypes.c
	locale.c
	signal.c
	time.c
	wchar.c
	wctype.c
)

if(MINGW)
	set( SRC ${SRC}
		mingw/assert.c
		mingw/errno.c
		mingw/wchar.c
	)
endif(MINGW)

if(APPLE)
	set( SRC ${SRC}
		osx/assert.c
		osx/errno.c
		osx/wchar.c
	)
endif(APPLE)

add_library( clang-stdc ${SRC})
